package com.njtoyo.taxi.admin.mapper.master.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.njtoyo.taxi.admin.mapper.master.enums.SimpleCallRideOrderPaymentChannel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 一键叫车行程订单表
 * </p>
 *
 * @author Dell
 * @since 2021-11-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "SimpleCallRideOrder对象", description = "一键叫车行程订单表")
public class SimpleCallRideOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "内部订单编号")
    private String number;

    @ApiModelProperty(value = "外部订单编号")
    private String outTradeNumber;

    @ApiModelProperty(value = "行程Id")
    private Long rideId;

    @ApiModelProperty(value = "乘客Id")
    private Long customerId;

    @ApiModelProperty(value = "司机Id")
    private Long driverId;

    @ApiModelProperty(value = "订单金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "司机实际可得金额")
    private BigDecimal driverEarnAmount;

    @ApiModelProperty(value = "乘客实际支付金额")
    private BigDecimal customerFarePaid;

    @ApiModelProperty(value = "账户余额支付金额")
    private BigDecimal balancePaid;

    @ApiModelProperty(value = "是否为线上支付 0:fasle[现金支付],1:true[线上支付]")
    private Boolean isOnline;

    @ApiModelProperty(value = "支付渠道 0:recharge[余额],1:wx_pay[微信]")
    private SimpleCallRideOrderPaymentChannel paymentChannel;

    @ApiModelProperty(value = "是否已支付")
    private Boolean isPaid;

    @ApiModelProperty(value = "支付时间戳")
    private Integer paidTimestamp;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;

    private Boolean isRefund;


}
